package com.returnsoft.softphone.entity;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name="transfer")
//@NamedQuery(name="Transfer.findAll", query="SELECT t FROM Transfer t")
public class Transfer  implements Serializable {
	
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;

	@Column(name="name")
	private String name;
	
	@Column(name="number")
	private String number;
	
	@ManyToMany
	@JoinTable(
		name="campaign_transfer"
		, joinColumns={
			@JoinColumn(name="transfer_id")
			}
		, inverseJoinColumns={
			@JoinColumn(name="campaign_id")
			}
		)
	private Set<Campaign> campaigns;
	

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}
	
	


	
}
